import { Component } from "react"
// import { getMoney } from '../练习'
class App extends Component {
  render () {
    return (
      <div>
        <h1>子组件</h1>
        <button onClick={() => {
          this.props.getMoney()
        }}>点击获取值</button>
        <button onClick={() => {
          this.props.changeMoney(Math.floor(Math.random() * 1e6 + 11))
        }}>点击修改值</button>
      </div>
    )
  }
}
export default App